package com.example.bigevent.mapper;

import com.example.bigevent.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Insert("INSERT INTO user(username, password, create_time, update_time) VALUES(#{username}, #{password}, now(), now())")
    void add(User user);

    @Select("SELECT * FROM user WHERE username = #{username}")
    User findByUsername(String username);
}